﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Newtonsoft.Json;
using LiuYan.Entity;
using LiuYan.Service;

namespace LiuYan.Web.Areas.Admin.Controllers
{
    public class PingJiaController : BaseController
    {
        //
        // GET: /Admin/GoodSort/

        public ActionResult Index()
        {
          
            return View();
        }
      
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int Del(string id)
        {
            return new BaseService().Dels(id, "TB_Evaluate",false);
        }

        public string GetList(int pageCount, int pageIndex)
        {
            return JsonConvert.SerializeObject(new EvaluateService().GetList(pageCount, pageIndex));
        }


        /// <summary>
        /// 获取一条数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetOnetData(int id)
        {
            return JsonConvert.SerializeObject(new BaseService().GetOneData(id, "TB_Evaluate"));
        }
    }
}
